# Contributor: Tim <timstanleydev@gmail.com>
# Maintainer: John <ebusd@ebusd.eu>
pkgname=ebusd
pkgver=25.1
pkgrel=0
pkgdesc="Daemon for communication with eBUS heating systems"
url="https://github.com/john30/ebusd"
# Upstream only supports these archs.
arch="x86 x86_64 aarch64 armhf armv7"
license="GPL-3.0-only"
makedepends="cmake mosquitto-dev openssl-dev samurai"
source="$pkgname-$pkgver.tar.gz::https://github.com/john30/ebusd/archive/refs/tags/$pkgver.tar.gz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DBUILD_TESTING=ON
	cmake --build build
}

check() {
	ctest --output-on-failure --test-dir build
}

package() {
	DESTDIR="$pkgdir" cmake --install build --prefix /usr
}

sha512sums="
ff69ee0b36b0e2ad9e44d090ba9507f51430ebb66e79948a44f8c719dbaf00e03a47c791e8f9e305b7dcb8e4fe87a7f00fb8f05c8a7c89e9a1b524e257576d7c  ebusd-25.1.tar.gz
"
